package com.runtime.hongyunuser.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderDTO {
    private Integer orderId;
    private Integer userId;
    private String orderNumber;
    private String productNumber;
    private String companyName;
    private String remark;
    private String status;

    // 地址相关字段
    private Integer shippingAddressId;
    private String province;
    private String city;
    private String district;
    private String detailAddress;

    // 金额相关
    private BigDecimal totalAmount;

    // 配送信息
    private String shippingMethod;
    private String trackingNumber;
    private String pickupCode;

    // 支付信息
    private String paymentMethod;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdAt;

    // 商品列表（不需要在数据库查询中包含，由单独接口获取）
    @JsonIgnore
    private List<OrderItemDTO> items;

    // 收货地址信息（不需要在数据库查询中包含，由单独接口获取）
    @JsonIgnore
    private ShippingAddressDTO shippingAddress;
}